home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilstem / dosutil2 / banner2.lbr / BANDOC.BAS (.txt) < prev    next >
Encoding:
GW-BASIC  |  1985-03-03  |  2.4 KB  |  56 lines

  1. 10  DEFINT A-Z : ON ERROR GOTO 2000 : KEY OFF
  2. 11  GOSUB 3000 : PGE=2
  3. 12  IF EPSON THEN LPRINT CHR$(27)"E";
  4. 15  LPRINT TAB(30)CHR$(14)"*BANNER*" : LPRINT : X=3
  5. 17  FS$="banhelp.txt"
  6. 20  OPEN FS$ FOR INPUT AS #1
  7. 30  WHILE NOT EOF(1)
  8. 40  LINE INPUT #1,A$
  9. 50  X=X+1
  10. 60  IF INSTR(A$,"~") THEN GOSUB 1000 : GOTO 100
  11. 65  PRINT A$
  12. 70  FOR Y=1 TO LEN(A$)
  13. 80  Z = ASC(MID$(A$,Y,1)) : IF Z < 32 OR Z > 127 THEN LPRINT "."; ELSE LPRINT CHR$(Z);
  14. 90  NEXT : LPRINT
  15. 100  WEND
  16. 120  CLOSE
  17. 130  LPRINT "This is the text of the *BANNER* original message.
  18. 140  LPRINT : LPRINT "   The *BANNER* that loads up on initialization is called BAN.BAN"
  19. 150  LPRINT "  If you name your own *BANNER* file BAN.BAN it will be loaded instead."
  20. 160  LPRINT "  The original BAN.BAN is also stored on disk as TEST.BAN, so you can restore"
  21. 170  LPRINT "  it if you want."
  22. 180  LPRINT : LPRINT "Run this message as a *BANNER* to see how the various commands work." : LPRINT
  23. 190  FS$="test.ban"
  24. 200  J=1 : OPEN FS$ FOR INPUT AS #1
  25. 210  WHILE NOT EOF(1)
  26. 220  LINE INPUT #1,A$
  27. 230  LPRINT USING "### >&";J,A$ : PRINT USING "### >&";J,A$ : J=J+1
  28. 240  WEND
  29. 250  CLOSE : LPRINT CHR$(12);
  30. 260  CLS : PRINT "*BANNER* documentation printed!" : PRINT : PRINT "Thanks for your patience."
  31. 270  PRINT : PRINT "     *BANNER*" : PRINT "(c) 1982 Martin Smith" : PRINT
  32. 300  KEY ON : END
  33. 1000  X=X+3 : IF X > 40 THEN LPRINT CHR$(12); : GOSUB 1100 : LPRINT "                page";PGE: LPRINT : X=3 :PGE=PGE+1 ELSE LPRINT : LPRINT STRING$(79,"-") : LPRINT
  34. 1020  PRINT : PRINT STRING$(79,"-") : PRINT
  35. 1030  RETURN
  36. 1100  IF EPSON THEN LPRINT TAB(30)CHR$(14)"*BANNER*";CHR$(20); ELSE LPRINT TAB(30)"*BANNER*      ";
  37. 1110  RETURN
  38. 2000  CLOSE
  39. 2005  IF ERR=53 THEN PRINT "I can't find one of the two files needed to print this documentation. They are 'BANHELP.TXT' and 'TEST.BAN'." : INPUT "Enter a new drive or 'end' to quit";A$
  40. 2010  IF ERR=53 THEN IF A$="end" OR A$="END" OR A$="e" OR A$="E" THEN ON ERROR GOTO 0 : END
  41. 2020  IF ERR=53 THEN IF MID$(A$,2,1)=":" THEN FS$=MID$(A$,1,2)+FS$ : RESUME
  42. 2030  IF ERR=53 THEN IF A$="a" OR A$="A" THEN FS$="A:"+FS$ : RESUME ELSE IF A$="b" OR A$="B" THEN FS$="B:"+FS$ : RESUME ELSE IF A$="c" OR A$="C" THEN FS$="C:"+FS$ : RESUME
  43. 2040  IF ERR=71 THEN INPUT "The disk is not ready. Press <ENTER> to continue . . .";A$ : RESUME
  44. 2050  IF ERR=27 OR ERR=25 THEN INPUT "Get the printer ready and press <ENTER> . . .";A$ : RUN
  45. 2060  IF ERR=24 THEN RESUME NEXT
  46. 2900  PRINT "I tried!"
  47. 2999  ON ERROR GOTO 0
  48. 3000  CLS : PRINT "*BANNER* documentation."
  49. 3010  PRINT : PRINT "This will print the help file from *BANNER* on the line printer."
  50. 3020  PRINT : PRINT "Is the Printer an IBM or EPSON MX series printer?" : I$="" : WHILE I$="" : I$=INKEY$ : WEND
  51. 3030  IF I$="n" OR I$="N" THEN EPSON=0 ELSE EPSON=-1
  52. 3035  PRINT : PRINT "Get the printer ready." : PRINT
  53. 3040  PRINT : INPUT "Press <ENTER> when ready, or <END> or <QUIT> to abort . . . ";A$
  54. 3050  IF A$="END" OR A$="end" OR A$="E" OR A$="e" OR A$="QUIT" OR A$="quit" OR A$="Q" OR A$="q" THEN PRINT "Help file printing terminated." : END
  55. 3060  RETURN
  56.